Hi Azed,
KMotion/KFlop maintains an absolute time in seconds since the board was powered up as a 64-bit double-precision floating-point number that has 20 nanosecond resolution and can span years of time.
Time_sec() will return this absolute time.
WaitUntil(xx) will wait until the specified absolute time passes.
For example to implement a delay of 1 second you might do:
double T0;
T0 = Time_sec();
// possibly do something else
WaitTill(T0+1.0);
This technique has some advantages over Delay_sec(1.0) because it is based on absolute time which avoids small errors that can accumulate if performed many times. Also it may allow you to do something else while waiting.
The program basically stays there, unless of course its time slice ends and it gets pre-empted to execute other threads. For a description of how KFlop multi-tasking works see:
Regards
TK